﻿using UnityEngine;

public class ButterflyFreezeBehaviour : BaseBehaviour
{
    protected override void start()
    {
        disableForce();
    }

    private void disableForce()
    {
        constantForce.force = Vector3.zero;
    }

    protected override void update(float deltaTime)
    {
        if (constantForce.force == Vector3.zero)
        {
            rigidbody.velocity = Vector3.zero;
        }
        else
        {
            GameObjectManager.destroy(this);
        }

        base.update(deltaTime);
    }    
}
